/** \file
* \par Subversion URL:
* \$URL: http://battletank211.googlecode.com/svn/trunk/engine/src/mobileobject.cpp $
* \version \$Rev: 13 $
* \date    \$Date: 2009-10-14 01:35:38 +0000 (Wed, 14 Oct 2009) $
*/

#include "mobileobject.hpp"

void MobileObject::DisplaceSetup() {
	if (speed) {
		vx = GetXVelocity();
		vy = GetYVelocity();
	}
	else {
		vx = 0;
		vy = 0;
	}
}

void MobileObject::Displace(double t) {
	if (speed) {
		double td = t - told;
		px += vx*td;
		py += vy*td;
		told = t;
	}
}
